PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
+#NOTE: ConditionEnvironment works with systemd >= 246
+ConditionEnvironment=XDG_SESSION_TYPE=%I
+
[Service]
Slice=session.slice
Type=notify
-# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I in
-# the [Unit] section with systemd >= 246. Also, the current solution is
-# kind of painful as systemd had a bug where it retries the condition.
-# Only start if the template instance matches the session type.
-ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'
ExecStart=@bindir@/gnome-shell
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1
PartOf=gnome-session-initialized.target
Before=gnome-session-initialized.target
+#NOTE: ConditionEnvironment works with systemd >= 246
+ConditionEnvironment=XDG_SESSION_TYPE=%I
+
# Limit startup frequency more than the default
StartLimitIntervalSec=15s
StartLimitBurst=3
[Service]
Slice=session.slice
Type=notify
-# NOTE: This can be replaced with ConditionEnvironment=XDG_SESSION_TYPE=%I in
-# the [Unit] section with systemd >= 246. Also, the current solution is
-# kind of painful as systemd had a bug where it retries the condition.
-# Only start if the template instance matches the session type.
-ExecCondition=/bin/sh -c 'test "$XDG_SESSION_TYPE" = "%I" || exit 2'
ExecStart=@bindir@/gnome-shell
# Exit code 1 means we are probably *not* dealing with an extension failure
SuccessExitStatus=1